package com.qph.utils.encrypt;

import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;

import sun.misc.BASE64Decoder;

@SuppressWarnings("restriction")
public class Key
{
	private static String encryptKey = "7EV/Zzutjzg=";

	public Key()
	{
	}

	public static SecretKey loadKey()
		throws Exception
	{
		
		BASE64Decoder d = new BASE64Decoder();
		//byte b[] = d.decodeBuffer(fis);
		byte b[] = d.decodeBuffer(encryptKey);
		DESKeySpec dks = new DESKeySpec(b);
		SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
		return  keyFactory.generateSecret(dks);
		}
}